<?php
		
	class pole
	{	
	var $totoPole = array();
	 //rád bych tu dal private ale to PHP 4.3 ,které na db.fbmi je, nepodporuje :(
	
		function VratCelaCisla(){
		$Cisla = array();
		foreach($this->totoPole as $prvek){
		if(is_int($prvek)){ array_push($Cisla,$prvek);}
		}
		return $Cisla;
	}
	
	function VratRetezce(){
		
		$Retezce = array();
		foreach($this->totoPole as $prvek){
		if(is_string($prvek)){ array_push($Retezce,$prvek);}
		}
		return $Retezce;
	}
	
	function VratPole(){
		
		return $this->totoPole;
	}
	function Pocet(){
		
		return count($this->totoPole);
	}
	function Setrid(){
		$pole=$this->VratCelaCisla();
		sort($pole);
		return $pole;
	}
	
	function Pridej(){
	$arg = func_get_args();
	foreach($arg as $k){
	array_push($this->totoPole,$k);
	}
	}
	
	function DejNejvetsi(){
	$pole=$this->Setrid();
	return $pole[count($pole)-1];
	}
	function DejNejmensi(){
	$pole=$this->Setrid();
	return $pole[0];
	}
	
	function PocetPismen(){
	$slova = $this->VratRetezce();
	$pismen=0;
	$jednopismena=0;
	foreach($slova as $k){
	$pismen=$pismen+strlen($k);
	if(strlen($k)==1)$jednopismen++;
	}
	return array("Celkove"=>$pismen,"Jednopismen"=>$jednopismen);
	}
	
	function SpocitejDalsiBlbosti(){
	$pocetPolozek=$this->Pocet();
	$pocetCelychCisel = count($this->VratCelaCisla());
	
	
	
	
	return array("polozek" =>$pocetPolozek,"Cisel"=>$pocetCelychCisel);
	}
	
}
	
?>